// Copyright (c) 2019 Presto Labs Pte. Ltd.
// Author: xguo

#include "coin2/exchange/base/symbology/currency.h"

#include <gtest/gtest.h>

TEST(Currency, constructor) {
  using namespace coin2::exchange::base::symbology;
  ExchangeType exchange = ExchangeType::UNKNOWN_EXCHANGE_TYPE;

  Currency usd("USD", "usd", exchange);
  Currency btc("BTC", "btc", exchange);
  Currency usdt("USDT", "usdt", exchange);
  Currency eurt("EURT", "eurt", exchange);

  EXPECT_EQ(usd.currency(), "USD");
  EXPECT_EQ(usd.native_currency(), "usd");
  EXPECT_EQ(usd.rep_currency(), "USD");

  EXPECT_EQ(btc.currency(), "BTC");
  EXPECT_EQ(btc.native_currency(), "btc");
  EXPECT_EQ(btc.rep_currency(), "BTC");

  EXPECT_EQ(usdt.currency(), "USDT");
  EXPECT_EQ(usdt.native_currency(), "usdt");
  EXPECT_EQ(usdt.rep_currency(), "USD");

  EXPECT_EQ(eurt.currency(), "EURT");
  EXPECT_EQ(eurt.native_currency(), "eurt");
  EXPECT_EQ(eurt.rep_currency(), "EUR");
}
